home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1995 March / PC Plus Super CD (Issue 101) (March 1995).iso / tclite / include / dict.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-27  |  1.4 KB  |  40 lines

  1. #ifndef    DICTIONARY_H
  2. #define    DICTIONARY_H
  3.  
  4. #include "set.h"
  5.  
  6. extern const Class class_Dictionary;
  7.  
  8. class LookupKey;
  9. class Assoc;
  10. class OrderedCollection;
  11.  
  12. class Dictionary: public Set {
  13. public:
  14.     Dictionary(unsigned size =CLTN_DEFAULT_CAPACITY);
  15.     Dictionary(const Dictionary&);
  16.     void operator=(const Dictionary&);
  17.     bool operator==(const Dictionary&) const;
  18.     bool operator!=(const Dictionary& d) const    { return !(*this == d); }
  19.     virtual    Object* add(const Object&);
  20.     virtual Assoc* addAssoc(const Object& key, const Object& value);
  21.     virtual Collection& addContentsTo(Collection&) const;
  22.     virtual Collection& addKeysTo(Collection&) const;
  23.     virtual Collection& addValuesTo(Collection&) const;
  24.     virtual LookupKey& assocAt(const Object& key) const;
  25.     virtual Object* atKey(const Object& key) const;
  26.     virtual Object* atKey(const Object& key, const Object& newValue) const;
  27.     virtual bool includesAssoc(const LookupKey& asc) const;
  28.     virtual bool includesKey(const Object& key) const;
  29.     virtual const Class* isA() const;
  30.     virtual bool isEqual(const Object&) const;
  31.     virtual Object* keyAtValue(const Object& val) const;
  32.     virtual unsigned occurrencesOf(const Object& val) const;
  33.     virtual Object* remove(const Object& asc);
  34.     virtual LookupKey& removeAssoc(const LookupKey& asc);
  35.     virtual LookupKey& removeKey(const Object& key);
  36.     virtual const Class* species() const;
  37. };
  38.  
  39. #endif
  40.